<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport"
			content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link   href="../common/mui/mui.min.css" rel="stylesheet" />
		<link   href="../common/css/yahei.css" rel="stylesheet" />
		<link   href="../common/css/iconfont.css" rel="stylesheet" />
		<link   href="../common/css/mui.picker.min.css" rel="stylesheet" />
		<link    href="../common/css/mui.poppicker.css" rel="stylesheet" />
		<link    href="../common/IPConfig/ipConfig.css" rel="stylesheet" />
		<link    href="../common/css/xhPicker.css" rel="stylesheet" />
		<link    href="../common/css/app.css" rel="stylesheet" />
		<link    href="../common/css/login.css" rel="stylesheet" />
	</head>

	<body class="YaHei">
		<header class="mui-bar mui-bar-nav">
		    <div id="navimg" style="text-align: center;"><img style="margin-top: 10px;" src="../common/images/logo-white.png" width="130px" height="20px"></div>
		</header>
		<div class="mui-content">
			<div id="mediway">
				<img src="../common/images/bg-login.png" >
			</div>
			<div id="bottom">
				<form id="login-form" class="mui-input-group">
					<div class="mui-input-row">
						<label>OA账号</label>
						<input id="account" type="text" class="mui-input-clear mui-input" placeholder="请输入OA账号" value="">
					</div>
					<div class="mui-input-row">
						<label>OA密码</label>
						<input id="password" type="password" class="mui-input-password mui-input" placeholder="请输入OA密码" value="">
					</div>
				</form>
				<div id="configBtn" class="configBtn" style="display: none;">设置服务器地址</div>
				<div class="mui-content-padded">
					<button id="selectLocBtn" class="mui-btn iconfont icon-ward" disabled="disabled" onclick="selectLoc(this)">
						登录获取科室列表
					</button>
					<button id="login" class="mui-btn mui-btn-block mui-btn-primary">登录</button>
					<div id="link-area">
						<a id="version">VERSION</a>
						<a id="versionCode">1.0.0</a>
					</div>
				</div>
				<form id="rememberMe" class="mui-input-group">
					<a>
						<span id="autoLogin" class="nurfont"></span>
						<span style="color: #24AF96">自动登录</span>
					</a>
				</form>
			</div>
		</div>

		<script    src="../common/mui/mui.js"></script>
		<script    src="../common/js/h5adapter.js"></script>
		<script    src="../common/mui/mui.picker.js"></script>
		<script    src="../common/mui/mui.poppicker.js"></script>
		<script    src="../common/js/jquery-3.4.1.min.js"></script>
		<script    src="../common/mui/mui.enterfocus.js"></script>
		<script    src="../common/js/xhPicker.js"></script>
		<script    src="../common/js/globalSet.js"></script>
		<script    src="../common/js/DHCWebService.js"></script>
		<script    src="../common/js/app.js"></script>
		<script type="text/javascript" src="../common/js/login.js"></script>
		<script>

			var file = "file:///data/storage/el1/bundle/entry/resources/resfile/js/script.js";
          // 使用file协议通过XMLHttpRequest跨域访问本地js文件。
                var xmlHttpReq = new XMLHttpRequest();
                     console.log("6666666")
                		console.log(JSON.stringify(xmlHttpReq))
                   console.log(xmlHttpReq)
                       console.log("6666666")
                xmlHttpReq.onreadystatechange = function(){
                    console.log("readyState:" + xmlHttpReq.readyState);
                    console.log("status:" + xmlHttpReq.status);
                    if(xmlHttpReq.readyState == 4){
                        if (xmlHttpReq.status == 200) {
                    // 如果ets侧正确设置路径列表，则此处能正常获取资源
                            const element = document.getElementById('text');
                            element.textContent = "load " + file + " success";
                        } else {
                    // 如果ets侧不设置路径列表，则此处会触发CORS跨域检查错误
                            const element = document.getElementById('text');
                            element.textContent = "load " + file + " failed";
                        }
                    }
                }
                xmlHttpReq.open("GET", file);
                xmlHttpReq.send(null);
		</script>
	</body>  

</html>
